package main

import (
	"cmdb-go/cmdb"
	sqlmodel "cmdb-go/commonorm"
	"cmdb-go/configmodel"
	containerModel "cmdb-go/containermodel"
	"cmdb-go/router"
	_ "github.com/jinzhu/gorm/dialects/mysql"
)


func main(){
	cmdb.Cronjob(configmodel.ConfigGet().CroncontainerMon,containerModel.CheckContainerjob)
	cmdb.Cronjob(configmodel.ConfigGet().CronContainerClean,containerModel.CronContainerClaer)
	configmodel.ConfigGet()
	sqlmodel.CheckDbconn(sqlmodel.Err)
	// sqlmodel.Sqlmodel()
	// 分离了router 调用routers下的router文件
	router.Router().Run(configmodel.ConfigGet().ServerPort)
}
